<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

//申述回复表
class AppealReply extends Model
{
    protected $table = 'appeal_reply';

    protected $fillable = [
    	'uid', //回复人ID
    	'appeal_id', //申述ID
    	'content', //回复内容
        'status', //状态 0 申述中，1 申述成功，2 申述失败
        'note',
    ];

    //关联图片表
    public function appeal_reply_imgs()
    {
    	return $this->hasMany('App\\Models\\AppealReplyImg', 'reply_id', 'id');
    }
    //关联用户
    public function user()
    {
    	return $this->hasOne('App\\Models\\User','id', 'uid');
    }
}
